//
//  NewsDetailViewController.m
//  MusicNews
//
//  Created by lanou3g on 15/10/15.
//  Copyright © 2015年 LC.J. All rights reserved.
//

#import "NewsDetailViewController.h"
#import "NewsModel.h"
#import "DetailModel.h"
#import "DetailImageModel.h"
#import "NewsDetailView.h"
#import "NewsDetailView.h"
#import "MBProgressHUD.h"
@interface NewsDetailViewController ()<UIWebViewDelegate>
@property (nonatomic, retain) MBProgressHUD *hud;
@property (nonatomic, strong) UIImageView *imageView;
@end

@implementation NewsDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

#pragma mark - 返回按钮的点击事件
- (void)return:(UIButton*)button
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

-(void)viewWillAppear:(BOOL)animated{
    [self.navigationController setNavigationBarHidden:YES];
    self.tabBarController.tabBar.hidden = YES;
    self.newsDetailView = [[NewsDetailView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.newsDetailView.webView.delegate = self;
    [self.view addSubview:self.newsDetailView];
    self.navigationController.navigationBar.translucent = NO;
    self.backButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.backButton.frame = CGRectMake(10, 20, 45, 45);
    [self.backButton setBackgroundImage:[UIImage imageNamed:@"night_icon_back@2x"] forState:UIControlStateNormal];
    [self.backButton addTarget:self action:@selector(return:) forControlEvents:UIControlEventTouchUpInside];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(self.view.bounds.size.width - 110, 23, 115, 40)];
    label.text = [NSString stringWithFormat:@"%@跟帖", self.newsModel.replyCount];
    label.textColor = [UIColor blueColor];
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeSystem];
    button1.frame = CGRectMake(0, 0, 375, 60);
    [button1 setBackgroundColor:[UIColor whiteColor]];
    [self.view addSubview:button1];
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 60, self.view.bounds.size.width, 2)];
    imageView.backgroundColor = [UIColor colorWithWhite:0.779 alpha:1.000];
    [self.view addSubview:self.backButton];
    [self.view addSubview:label];
    [self.view addSubview:imageView];
    
    
}


-(void)loadData{
    
    
    
}



@end
